<script setup name="home">
import { onMounted } from 'vue';
import { useRouter } from 'vue-router';
import { ref } from 'vue';
const input = ref('')
// import { homeStore } from "@/store/modules/home";
// import { storeToRefs } from "pinia";
// import { onMounted } from "vue";
// import dynameicRouter from '@/router/dynamic-router.js'
// const store = homeStore();
// // 使用方式1结构赋值，需要使用storeToRefs(store)
// const { a, b } = storeToRefs(store);
// // 使用方式2
// console.log(store.a);
// console.log(store.b);
// const reset = () => {
//   store.$reset()
// }
// const batchSet = () => {
//   store.$patch((state) => {
//     state.a = '张三'
//     state.b = '李四'
//   })
// }
// onMounted(() => {
//   console.log('dynameicRouter',dynameicRouter)
//   // dynameicRouter.forEech(e=>{
//   //   console.log('e',e)
//   // })
// })
onMounted(() => {
  const router = useRouter()
})
</script>
<template>
  <!-- <div>-----------store参数</div>
  <div>{{ store.a }}{{ store.b }}</div>
  <div>{{ a }}{{ b }}</div>
  <div>---------getters</div>
  <div>{{ store.getA }}</div>
  <el-button type="primary" size="default" icon='Plus' @click="store.a = 'ccc'">修改A</el-button>
  <el-button type="primary" size="default" icon='Plus' @click="reset()">重置</el-button>
  <el-button type="primary" size="default" icon='Plus' @click="batchSet()">批量修改</el-button>
  <el-button type="primary" size="default" icon='Plus' @click="store.saveB('xxx')">业务修改B</el-button>
  <el-button type="info" size="default" icon='Plus' @click="store.saveB('xxx')">业务修改B</el-button> -->
  <div class="view-container">
    <RouterLink :to="{ name: 'testA' }">testAA</RouterLink>
    <el-input v-model="input" placeholder="Please input" />
    <div style="height: 400px;">home</div>
    <el-input v-model="input" placeholder="Please input" />
    <div style="height: 400px;">home</div>
    <el-input v-model="input" placeholder="Please input" />
    <div style="height: 400px;">home</div>
    <el-input v-model="input" placeholder="Please input" />
    <div style="height: 400px;">home</div>
    <el-input v-model="input" placeholder="Please input" />
    <div style="height: 400px;">home</div>
  </div>
</template>
<style lang="scss" scoped></style>